package com.group.model;


/**
 * 交易所的交易记录
 *
 * @author Zhangyang Hu
 */
public class ExchangeTrades {

    /**
     * id
     */
    private Long id;

    /**
     * 交易所的交易id
     */
    private String tid;

    /**
     * 价格
     */
    private Double price;

    /**
     * 数量
     */
    private Double amount;

    /**
     * 交易时间，Unix epoch time, 毫秒计时
     */
    private Long time;

    /**
     * 将交易时间以人类可读的格式显示，样例 2018-04-25 16:33:26.959
     */
    private String tradeTime;

    /**
     * 基础资产，比如BTCUSD交易对，bitcoin就是基础资产
     */
    private String baseAsset;

    /**
     * 计价资产，比如BTCUSD交易对，USD就是计价资产
     */
    private String quoteAsset;

    /**
     * 交易的买卖标记，+表示买，-表示卖
     */
    private String buySellFlag;

    /**
     * 交易所名称
     */
    private String exchange;

    /**
     * 成交额 (对爬虫插入数据没有影响)
     */
    private Double volume;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;

        //2018.04.25
        this.tradeTime = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S").format(new java.util.Date(time));
    }

    public String getBuySellFlag() {
        return buySellFlag;
    }

    public void setBuySellFlag(String buySellFlag) {
        this.buySellFlag = buySellFlag;
    }

    public String getBaseAsset() {
        return baseAsset;
    }

    public void setBaseAsset(String baseAsset) {
        this.baseAsset = baseAsset;
    }

    public String getQuoteAsset() {
        return quoteAsset;
    }

    public void setQuoteAsset(String quoteAsset) {
        this.quoteAsset = quoteAsset;
    }

    public String getTradeTime() {
        return tradeTime;
    }

    public void setTradeTime(String tradeTime) {
        this.tradeTime = tradeTime;
    }

    public String getExchange() {
        return exchange;
    }

    public void setExchange(String exchange) {
        this.exchange = exchange;
    }

    public Double getVolume() {
        return volume;
    }

    public void setVolume(Double volume) {
        this.volume = volume;
    }

}
